/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-05-08
 * Time: 20:31
 */

public class Client {

    public static void main(String[] args) {

        //从大到小创建对象
        OrganizationComponent un = new University("清华大学","中国顶级大学");

        //创建学院
        OrganizationComponent college1 = new College("计算机学院","计算机");
        OrganizationComponent college2 = new College("信息工程学院","信息工程");

        //创建专业
        college1.add(new Department("软件工程","软件工程"));
        college1.add(new Department("网络工程","网络工程"));
        college1.add(new Department("计算机科学技术","计算机科学技术"));

        college2.add(new Department("通信工程","不好学"));
        college2.add(new Department("信息工程","比较好学"));

        //将学院 加入 学校
        un.add(college1);
        un.add(college2);

        un.print();
        college1.print();

    }

}
